home *** CD-ROM | disk | FTP | other *** search
Text File | 1998-04-30 | 1.0 KB | 67 lines | [TEXT/MPS ] |
- /*
- File: CDirtyText.cp
-
- Contains: xxx put contents here xxx
-
- Copyright: © 1995 by Apple Computer, Inc., all rights reserved.
-
- */
-
- // ===========================================================================
- // CDirtyText.cp ©1994 Metrowerks Inc. All rights reserved.
- // ===========================================================================
- //
- // Subclass of LTextEdit which keeps track of whether the text is dirty
- // (i.e., the user has made changes since last save)
-
- #include "CDirtyText.h"
-
-
- CDirtyText*
- CDirtyText::CreateDirtyTextStream(
- LStream *inStream)
- {
- return (new CDirtyText(inStream));
- }
-
-
-
- CDirtyText::CDirtyText(
- LStream *inStream)
- : LTextEdit(inStream)
- {
- mIsDirty = false;
- }
-
-
- void
- CDirtyText::SetTextPtr(
- Ptr inTextP,
- Int32 inTextLen)
- {
- LTextEdit::SetTextPtr(inTextP, inTextLen);
-
- mIsDirty = false;
- }
-
-
- void
- CDirtyText::UserChangedText()
- {
- mIsDirty = true;
- }
-
-
- Boolean
- CDirtyText::IsDirty()
- {
- return mIsDirty;
- }
-
-
- void
- CDirtyText::SetDirty(
- Boolean inDirty)
- {
- mIsDirty = inDirty;
- }